#include <Gal.h>
#include <stdio.h>
#include <stdlib.h>
#include <xf86drm.h>
#include <nouveau_bo.h>
#include <nouveau_device.h>
#include <nouveau_pushbuf.h>
#include "Private.h"
#include <unistd.h>

/// <summary>
/// TODO
/// </summary>
int NVCreateDisplayContext(DisplayPtr dsp)
{
	if (dsp == NULL)
		return -1;

	if (!(dsp->ctx = GalCreateContext()))
		return -1;

	dsp->ctx->handle;
	dsp->ctx->refcount = 1;
	dsp->ctx->buffer = dsp->front;
	dsp->ctx->type = 1;

	return 0;
}
